// logs.js
import { betterData } from '../../mockData/data'
Page({
  data: {
    items:[],
    mainActiveIndex: 0,
    activeId: null,
    rightList:[],
  },
  onClickNav(e) {
    const idx = e.detail.index
    this.setData({
      mainActiveIndex: idx,
      rightList:betterData.rightItem[idx]
    });
  },
  toDetail(e){ 
    wx.navigateTo({
      url: '/pages/betterDetail/betterDetail?id='+e.currentTarget.dataset.id,
    })
  },

  onLoad() {
    this.setData({
      items:betterData.items,
      rightList:betterData.rightItem[0]
    })
  }
}) 
